package com.ricohgag.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ricohgag.entity.Goods;
import com.ricohgag.entity.custom.GoodsTools;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 肖晖
 * @since 2018-08-25
 */
public interface GoodsService extends IService<Goods> {
    public IPage<Goods> selectGoodsPage(String name, Page<Goods> page) throws Exception;

    public Goods selectGoodsOne(Integer id) throws Exception;

    public IPage<Goods> selectHomeGoodsPage(Page<Goods> page, GoodsTools goodsTools) throws Exception;

    public int updateGoods(Goods goods) throws Exception;

    public int insertGoods(Goods goods) throws Exception;

    public int deleteGoods(int id) throws Exception;

    public List<Goods> selectGoodsHot() throws Exception;

    public List<Goods> selectGoodsNew() throws Exception;

    /**
     * 根据分类下的商品
     * @param catalogId
     * @return
     */
    public List<Goods> selectGoodsByCatalogId(int catalogId);


}
